package com.yc.jpyy.base.bean;


import com.alibaba.fastjson.JSON;

public class RestResponse extends BaseBean{

	/** 
	* @Fields serialVersionUID : TODO() 
	*/ 
	private static final long serialVersionUID = -1599411678301387889L;
    // 0成功  1失败
	private int errorcode = 0;
	
	private Object data = null;
	
	public int getErrorcode() {
		return errorcode;
	}

	public void setErrorcode(int errorcode) {
		this.errorcode = errorcode;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	private String message = "操作成功";
 
	public RestResponse(){}
	
	public RestResponse(int errorcode, Object data, String message){
		this.errorcode = errorcode;
		this.data = data;
		this.message = message;
	 
	}

	public void setReturnMsg(int errorcode, String message) {
		this.errorcode = errorcode;
		this.message = message;
	}
	
	public String toJSON(){
		return JSON.toJSONString(this);
	}
}
